package com.lhj.xxsc.auth.feign;

import com.xxsc.common.utils.R;
import com.lhj.xxsc.auth.vo.SocialUser;
import com.lhj.xxsc.auth.vo.UserLoginVo;
import com.lhj.xxsc.auth.vo.UserRegistVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author 罗惠江
 * @version 1.0
 * @email 1511619294@qq.com
 * @date 2020/12/25 16:08
 */
@FeignClient("xxsc-member")
public interface MemberFeignService {

	/**
	 * 注册接口
	 *
	 * @param vo
	 * @return
	 */
	@PostMapping("/member/member/regist")
	R regist(@RequestBody UserRegistVo vo);

	/**
	 * 登录接口
	 *
	 * @param vo
	 * @return
	 */
	@PostMapping("/member/member/login")
	R login(@RequestBody UserLoginVo vo);

	/**
	 * 社交登录
	 *
	 * @param vo
	 * @return
	 * @throws Exception
	 */
	@PostMapping("/member/member/oauth2/login")
	R oauth2login(@RequestBody SocialUser vo) throws Exception;
}
